[rb] Add rubocop binary target for flexible linting#17006
[rb] Add rubocop binary target for flexible linting#17006titusfortner wants to merge 1 commit intotrunkfrom
Conversation
User description💥 What does this PR do?Adds a flexible 🔧 Implementation Notes
💡 Additional ConsiderationsThis matches the pattern I've been using with ruff and format 🔄 Types of changes
PR TypeEnhancement Description
Diagram Walkthroughflowchart LR
A["rb/BUILD.bazel"] -->|adds| B["rubocop binary target"]
A -->|removes| C["lint-unsafe target"]
B -->|accepts| D["custom rubocop flags"]
C -->|replaced by| B
|
| Relevant files | |||
|---|---|---|---|
| Enhancement |
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
There was a problem hiding this comment.
Pull request overview
This PR adds a flexible //rb:rubocop binary target that allows passing arbitrary rubocop flags via --, and removes the now-redundant //rb:lint-unsafe target. This provides better flexibility for running rubocop with custom options while maintaining the existing //rb:lint test target unchanged.
Changes:
- Added
//rb:rubocopbinary target that accepts arbitrary rubocop flags - Removed
//rb:lint-unsafebinary target (no longer needed)
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
|
fixed and merged into trunk. |
💥 What does this PR do?
Adds a flexible
//rb:rubocopbinary target that accepts any rubocop flags,and removes the now-redundant
//rb:lint-unsafetarget.🔧 Implementation Notes
//rb:rubocopincludes only the config and file paths, letting you pass any flags via--bazel run //rb:rubocop -- --autocorrect-all(replaces//rb:lint-unsafe)bazel run //rb:rubocop -- --only Metrics/AbcSizebazel run //rb:rubocop -- --auto-gen-config//rb:lintunchanged - still runs as a test with--autocorrect💡 Additional Considerations
This matches the pattern I've been using with ruff and format
🔄 Types of changes